# -*- coding:UTF-8 -*-
def subarraySum(self, nums):
    #write your code here
    sum=0
    map={}
    result=[]
    map[0]=-1
    for i in xrange(len(nums)):

        sum+=nums[i]
        if(map.has_key(sum)):
            result.append(map.get(sum)+1)
            result.append(i)
            return result
        map[sum]=i
    return result
print subarraySum("",[-3, 1, 2, -3, 4])